package com.jk.controller;

import com.jk.dto.TemPosition;
import com.jk.interfaces.TemPositionServiceApi;
import com.jk.pojo.PagedResponse;
import com.jk.service.TemPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @ClassName TemPositionController
 * @program: office
 * @description: TODO
 * @date 2025/2/13 10:43
 */
@RestController
public class TemPositionController implements TemPositionServiceApi {

    @Autowired
    private TemPositionService temPositionService;

    @Override
    public PagedResponse<TemPosition> findTemList(TemPosition temPosition, Integer pageNum, Integer pageSize) {
        return temPositionService.findTemList(temPosition,pageNum,pageSize);
    }
    @Override
    public void delTemById(Integer id) {
        temPositionService.delTemById(id);
    }


    @Override
    public void addTem(TemPosition temPosition) {
        temPosition.setState(0);
        temPositionService.addTem(temPosition);
    }

    @Override
    public TemPosition getTem(Integer id) {
        return temPositionService.getTem(id);
    }

    @Override
    public void updateTem(TemPosition temPosition) {
        temPositionService.updateTem(temPosition);
    }

    @Override
    public void updateStatus(Integer id) {
        temPositionService.updateStatus(id);

    }

    @Override
    public void updateState(TemPosition temPosition) {
        temPositionService.updateState(temPosition);
    }

    @Override
    public List<TemPosition> findTemPosition(TemPosition temPosition) {
        return temPositionService.findTemPosition(temPosition);
    }
}
